function cost = C_x(x_dot)

global gamma_x
global delta
global alpha
global c_x_1
global c_x_2
global x

state_dependent_term = max(gamma_x-x,0);

cost = c_x_1*max(x_dot+delta,0) + c_x_2*max(x_dot+delta,0).^alpha+state_dependent_term.*max(x_dot+delta,0);

end

